package com.gtc.zsk.model.vo;

import com.gtc.zsk.model.entity.QuestionBank;
import com.gtc.zsk.model.entity.User;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.Date;

@Data
public class BankMallUserVO implements Serializable {

    /**
     * 账号
     */
    private String userAccount;

    /**
     * 性别
     */
    private Integer gender;

    /**
     * 用户昵称
     */
    private String userName;


    /**
     * 用户角色：user/admin/ban
     */
    private String userRole;

    /**
     * vip等级
     */
    private Integer vipLevel;

    public static BankMallUserVO objToVo(User user) {
        if (user == null) {
            return null;
        }
        BankMallUserVO bankMallUserVO = new BankMallUserVO();
        BeanUtils.copyProperties(user, bankMallUserVO);
        return bankMallUserVO;
    }


    private static final long serialVersionUID = 1L;
}